www.gusucode.com > 云网互动影视系统(12套模版和资源联盟) 6.2 > 云网互动影视系统(12套模版和资源联盟) 6.2.4/免费版/Admin/Admin_Link.asp

    <html>
<head>
<META content=ywnt,云网互动影视管理系统 name=keywords>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>云网互动影视6.0--友情连接管理</title>
<LINK href="css/css.css" type=text/css rel=stylesheet>
</head>
<BODY leftMargin=0 topMargin=0 scroll=yes MARGINHEIGHT="0" MARGINWIDTH="0">
<script language="JavaScript" src="YWNT_TMS_Inc/YWNT_TMS_Common.js"></script>
<!--#include file="../Conn.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Function.asp" -->
<%
'===================================================================================================================
'软件名称:云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ:489234,2813712
'程序版权:云网互动科技有限公司
'程序开发:云网互动科技有限公司
'官方网站:http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
Call CheckLogin("LinkSystem")
sub EditSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Link where ID="&Request.Form("ID")
		Rs.open sql,Conn,1,3
		RS("LinkName")=Request.Form("LinkName")
		RS("LinkUrl")=Request.Form("LinkUrl")
		RS("LinkPic")=Request.Form("LinkPic")
		RS("LinkType")=Request.Form("LinkType")
		RS("LinkWith")=Request.Form("LinkWith")
		RS("LinkTel")=Request.Form("LinkTel")
		RS("LinkNote")=Request.Form("LinkNote")
		RS("LinkAudit")=Request.Form("LinkAudit")
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("修改友情连接"&Request.Form("LinkName"),9)
		call Admin_ShowErr("<li>友情连接改成功</li>","Admin_Link.asp",1)
end sub
sub AddSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Link"
		Rs.open sql,Conn,1,3
		Rs.addnew
		RS("LinkName")=Request.Form("LinkName")
		RS("LinkUrl")=Request.Form("LinkUrl")
		RS("LinkPic")=Request.Form("LinkPic")
		RS("LinkType")=Request.Form("LinkType")
		RS("LinkWith")=Request.Form("LinkWith")
		RS("LinkTel")=Request.Form("LinkTel")
		RS("LinkNote")=Request.Form("LinkNote")
		RS("LinkAudit")=1
		RS("LinkDate")=Now()
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("添加友情连接"&Request.Form("LinkName"),9)
		call Admin_ShowErr("<li>友情连接添加成功</li>","Admin_Link.asp",1)
end sub
sub Del()
	conn.execute "delete from YWNT_TMS_Link WHERE ID="&Request("ID")
	Call AddLog("删除友情连接",9)
	call Admin_ShowErr("<li>友情连接删除成功!</li>","Admin_Link.asp",1)
end sub 
sub Audit()
	Conn.execute("Update YWNT_TMS_Link set LinkAudit=1 where ID="&request.QueryString("ID")&"")
	Call AddLog("审核友情连接",9)
	call Admin_ShowErr("<li>友情连接审核成功!</li>","Admin_Link.asp",1)
end sub %>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td class=xingmu>有情连接管理</td>
    </tr>
    <tr>
      <td class="hback"><a href="Admin_Link.asp">管理首页</a> | <a href="Admin_Link.asp?Action=Add">添加连接</a> | <a href="Admin_Link.asp?LinkType=1">图片连接</a> | <a href="Admin_Link.asp?LinkType=0">文字连接</a> | <a href="Admin_Link.asp?LinkAudit=1">已审核</a> | <a href="Admin_Link.asp?LinkAudit=0">未审核</a></td>
    </tr>
  </tbody>
</table>
<% Action=Trim(request("Action"))
Select Case Action
Case "Add"
	call Add()
Case "AddSave"
	call AddSave()
Case "Edit"
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Link where ID="&Request("ID")
		Rs.open sql,Conn,1,1
		YWNT_TMS_ID=RS("ID")
		YWNT_TMS_LinkName=RS("LinkName")
		YWNT_TMS_LinkUrl = RS("LinkUrl")
		YWNT_TMS_LinkPic = RS("LinkPic")
		YWNT_TMS_LinkType=RS("LinkType")
		YWNT_TMS_LinkWith=RS("LinkWith")
		YWNT_TMS_LinkTel=RS("LinkTel")
		YWNT_TMS_LinkNote=RS("LinkNote")
		YWNT_TMS_LinkAudit=RS("LinkAudit")
		RS.close   
      	set RS=nothing
	call Edit()
Case "EditSave"
	call EditSave()
Case "Del"
	call Del()
Case "Audit"
	call Audit()
Case else
	call List()
End Select
sub List()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td width="5%" align="center" class=xingmu>ID</td>
      <td align="center" class=xingmu>站点名称</td>
      <td width="16%" align="center" class=xingmu>友情连接类型</td>
      <td width="10%" align="center" class=xingmu>审核</td>
      <td width="15%" align="center" class=xingmu>添加日期</td>
      <td width="10%" align="center" class=xingmu>操作</td>
    </tr>
<%Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="Select ID,LinkName,LinkType,LinkAudit,LinkDate from YWNT_TMS_Link "
		if Request.QueryString("LinkType")<>"" then
			sql=sql&"where LinkType="&Request.QueryString("LinkType")&" Order by LinkWith asc,ID asc"
		elseif Request.QueryString("LinkAudit")<>"" then
			sql=sql&"where LinkAudit="&Request.QueryString("LinkAudit")&" Order by LinkWith asc,ID asc"
		else
			sql=sql&"Order by LinkWith asc,ID asc"
		end if
		Rs.open sql,Conn,1,1
		if RS.eof then
		Response.Write"<tr><td colspan=""6"" height=40 class=""hback"">没有友情连接</td></tr>"
		else
		do while not RS.eof%>
    <tr>
      <td height=32 align="center" class="hback"><%=Rs("ID")%></td>
      <td height=32 class="hback"><%=Rs("LinkName")%></td>
      <td align="center" class="hback"><%=LinkTypeW(RS("LinkType"))%></td>
      <td align="center" class="hback"><%=LinkAuditW(RS("LinkAudit"),Rs("ID"))%></td>
      <td align="center" class="hback"><%=RS("LinkDate")%></td>
      <td align="center" class="hback"><A href="Admin_Link.asp?Action=Edit&ID=<%=RS("ID")%>">修改</A>|<A href="Admin_Link.asp?Action=Del&ID=<%=RS("ID")%>">删除</A></td>
    </tr>
		<%RS.movenext     
    	loop
		end if
		RS.close     
		set RS=nothing%>
  </tbody>
</table>
<%end sub
sub Add()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
 <form name="form" action="Admin_Link.asp?Action=AddSave" method="post">
  <tbody>
    <tr>
      <td colspan="2" class=xingmu>添加有情连接</td>
    </tr>
    <tr>
      <td width="21%" height=32 align="right" class="hback">站点名称:</td>
      <td height=15 class="hback"><input name="LinkName" type="text" id="LinkName" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">连接类型:</td>
      <td height=16 class="hback"><input type="radio" name="LinkType" value="1" onClick="showThumbnail_RateOrSize(1,'LinkPicS')">
        图片      <input name="LinkType" type="radio" value="0" checked onClick="showThumbnail_RateOrSize(0,'LinkPicS')">
        文字 </td>
    </tr>
	    <tr id="LinkPicS" style="display:none">
      <td height=32 align="right" class="hback">图片地址:</td>
      <td height=16 class="hback"><input name="LinkPic" id="LinkPic" size=40 maxlength="200">
        <input type="button" name="Button" value="选择图片" onClick="var TempReturnValue=OpenWindow('Dialog/SelectPic.asp?CurrPath=<% = CurrPath %>',500,290,window);if (TempReturnValue!='') document.form.LinkPic.value=TempReturnValue;" class=Anbutc></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">连接地址:</td>
      <td height=16 class="hback"><input name="LinkUrl" type="text" id="LinkUrl" size="40">        </td>
    </tr>
	    <tr>
      <td height=32 align="right" class="hback">权重(排列使用):</td>
      <td height=16 class="hback"><input name="LinkWith" type="text" id="LinkWith" value="0" size="40">        </td>
    </tr>
	<tr>
      <td height=32 align="right" class="hback">站长联系方式:</td>
      <td height=16 class="hback"><input name="LinkTel" type="text" id="LinkTel" size="40">
      </td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">站点说明:</td>
      <td height=15 class="hback"><textarea name="LinkNote" cols="40" rows="5" id="LinkNote"></textarea></td>
    </tr>
    <tr>
      <td height=32 colspan="2" align="center" class="hback"><input type="submit" name="Submit" value="添 加"></td>
    </tr>
  </tbody>
</form>
</table>
<%end sub
sub Edit()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <form name="form" action="Admin_Link.asp?Action=EditSave" method="post">
    <tbody>
      <tr>
        <td colspan="2" class=xingmu>修改有情连接</td>
      </tr>
      <tr>
        <td width="21%" height=32 align="right" class="hback">站点名称:</td>
        <td height=15 class="hback"><input name="LinkName" type="text" id="LinkName" value="<%=YWNT_TMS_LinkName%>" size="40"></td>
      </tr>
	  <tr>
        <td height=32 align="right" class="hback">审核:</td>
        <td height=16 class="hback"><input type="radio" name="LinkAudit" value="1" <%if YWNT_TMS_LinkAudit=1 then Response.Write("checked")%>>
          已审核
            <input type="radio" name="LinkAudit" value="0" <%if YWNT_TMS_LinkAudit=0 then Response.Write("checked")%>>
          未审核</td>
      </tr>
      <tr>
        <td height=32 align="right" class="hback">连接类型:</td>
        <td height=16 class="hback"><input type="radio" name="LinkType" value="1" onClick="showThumbnail_RateOrSize(1,'LinkPicS')" <%if YWNT_TMS_LinkType=1 then Response.Write("checked")%>>
          图片
            <input type="radio" name="LinkType" value="0" onClick="showThumbnail_RateOrSize(0,'LinkPicS')" <%if YWNT_TMS_LinkType=0 then Response.Write("checked")%>>
          文字 </td>
      </tr>
      <tr id="LinkPicS" style="display:none">
        <td height=32 align="right" class="hback">图片地址:</td>
        <td height=16 class="hback"><input name="LinkPic" id="LinkPic" value="<%=YWNT_TMS_LinkPic%>" size=40 maxlength="200">
          <input type="button" name="Button" value="选择图片" onClick="var TempReturnValue=OpenWindow('Dialog/SelectPic.asp?CurrPath=<% = CurrPath %>',500,290,window);if (TempReturnValue!='') document.form.LinkPic.value=TempReturnValue;" class=Anbutc>
        </td>
      </tr>
      <tr>
        <td height=32 align="right" class="hback">连接地址:</td>
        <td height=16 class="hback"><input name="LinkUrl" type="text" id="LinkUrl" value="<%=YWNT_TMS_LinkUrl%>" size="40">
        </td>
      </tr>
      <tr>
        <td height=32 align="right" class="hback">权重(排列使用):</td>
        <td height=16 class="hback"><input name="LinkWith" type="text" id="LinkWith" value="<%=YWNT_TMS_LinkWith%>" size="40">
        </td>
      </tr>
	  <tr>
        <td height=32 align="right" class="hback">站长联系方式:</td>
        <td height=16 class="hback"><input name="LinkTel" type="text" id="LinkTel" value="<%=YWNT_TMS_LinkTel%>" size="40">
        </td>
      </tr>
      <tr>
        <td height=32 align="right" class="hback">站点说明:</td>
        <td height=15 class="hback"><textarea name="LinkNote" cols="40" rows="5" id="LinkNote"><%=YWNT_TMS_LinkNote%></textarea></td>
      </tr>
      <tr>
        <td height=32 colspan="2" align="center" class="hback"><input name="ID" type="hidden" value="<%=YWNT_TMS_ID%>"><input type="submit" name="Submit" value="修 改"></td>
      </tr>
    </tbody>
  </form>
</table>
<%end sub%>
<script language="javascript">
<%if Action="Edit" then%>
showThumbnail_RateOrSize(<%=YWNT_TMS_LinkType%>,'LinkPicS')
<%end if%>
function showThumbnail_RateOrSize(param,pname)
{
	if(param==1)
	{
		document.getElementById(pname).style.display="block"
	}else
	{
		document.getElementById(pname).style.display="none"
	}
}
  </script>
<%call connclose()%>
</BODY></HTML>